@if (files && files.length && !edit) {
    <!-- Read only. -->
    <ion-item class="ion-text-wrap">
        <ion-label>
            <p class="item-heading">{{ plugin.name }}</p>
            <div>
                <core-files [files]="files" [component]="component" [componentId]="assign.cmid" [alwaysDownload]="true" />
            </div>
        </ion-label>
    </ion-item>
}

@if (edit) {
    <!-- Edit -->
    <div>
        <ion-item-divider class="ion-text-wrap" [sticky]="true">
            <ion-label>
                <p class="item-heading">{{ plugin.name }}</p>
            </ion-label>
        </ion-item-divider>
        <core-attachments [files]="files" [maxSize]="maxSize" [maxSubmissions]="maxSubmissions" [courseId]="assign.course"
            [component]="component" [componentId]="assign.cmid" [acceptedTypes]="acceptedTypes" [allowOffline]="allowOffline" />
    </div>
}
